let add = async (ctx) => {
  let promiseObj = new Promise((resolve,reject)=> {
    MongoClient.connect(url, function (err, db) {
        if (err) throw err;
        var dbo = db.db("hero");
        var myobj = { name: "菜鸟教程", url: "www.runoob" };
        dbo.collection("hero1").insertOne(myobj, function (err, res) {
          if (err) throw err;
          console.log("文档插入成功");
          db.close();
        });
      });
  })
};

module.exports = add;
